[XEN][POWERPC] Normalize timbase_freq to a 64bit value
authorJimi Xenidis <jimix@watson.ibm.com>
Fri, 15 Dec 2006 13:16:56 +0000 (08:16 -0500)
committerJimi Xenidis <jimix@watson.ibm.com>
Fri, 15 Dec 2006 13:16:56 +0000 (08:16 -0500)
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %20%BD%3B%7Bu%19%E0%1F%7Bk%FA%97%C7%A6U%E1%DC%02%7F%5D

xen/arch/powerpc/boot_of.c
xen/arch/powerpc/time.c
xen/include/asm-powerpc/time.h

index bcea9c03f5f5ab6c50e2a0d8181184e3a896e05f..88c7d497be1062e4a5994a37e70876bdedb13161 100644 (file)
@@ -1206,6 +1206,7 @@ static int __init boot_of_cpus(void)
     s32 cpuid;
     u32 cpu_clock[2];
     extern uint cpu_hard_id[NR_CPUS];
+    u32 tbf;
 
     /* Look up which CPU we are running on right now and get all info
      * from there */
@@ -1220,12 +1221,12 @@ static int __init boot_of_cpus(void)
 
     cpu_node = bootcpu_node;
 
-    result = of_getprop(cpu_node, "timebase-frequency", &timebase_freq,
-            sizeof(timebase_freq));
+    result = of_getprop(cpu_node, "timebase-frequency", &tbf, sizeof(tbf));
+    timebase_freq = tbf;
     if (result == OF_FAILURE) {
         of_panic("Couldn't get timebase frequency!\n");
     }
-    of_printf("OF: timebase-frequency = %d Hz\n", timebase_freq);
+    of_printf("OF: timebase-frequency = %ld Hz\n", timebase_freq);
 
     result = of_getprop(cpu_node, "clock-frequency",
                         &cpu_clock, sizeof(cpu_clock));
index 8f6bc70bda4b986f338f7944e6ed194efb25f970..e822af53e57fbbb83069bfffccdfcef1bdd36068 100644 (file)
@@ -32,7 +32,7 @@
 static int cpu_has_hdec = 1;
 ulong ticks_per_usec;
 unsigned long cpu_khz;
-unsigned int timebase_freq;
+s64 timebase_freq;
 
 s_time_t get_s_time(void)
 {
index a872d3fd0328dc257e20906fd387bb05853acab3..239d93f357cbc0501f2d1d2d5d428a7346aa3fd5 100644 (file)
@@ -27,7 +27,7 @@
 #include <xen/percpu.h>
 #include <asm/processor.h>
 
-extern unsigned int timebase_freq;
+extern s64 timebase_freq;
 #define CLOCK_TICK_RATE timebase_freq
 
 #define watchdog_disable() ((void)0)